<!DOCTYPE html>
<html>
<head>
	<title>Info in popup</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<script>
		var formData;
		var myForm;
		var myPopup;
		function doOnLoad() {
			formData = [
				{type: "settings", position: "label-left", labelWidth: 130, inputWidth: 150, noteWidth: 250, offsetLeft: 20},
				{type: "input", name: "prj_name", label: "Project Name", value: "My Project", info: true, userdata: {info: "Enter your project name here. This fields is required."}},
				{type: "input", name: "prj_descr", label: "Project Description", info: true, userdata: {info: "Enter your project description. It should reflect your project basic purposes. This fields is not required but also important."}},
				{type: "input", name: "email", label: "E-mail", info: true, userdata: {info: "Your valid email address to complete registartion. You will receive account activating instructions on this email."}}
			];
			myForm = new dhtmlXForm("myForm", formData);
			myForm.enableLiveValidation(true);
			myForm.attachEvent("onInfo", function(name,e){
				
				if (myPopup == null) myPopup = new dhtmlXPopup({mode: "bottom"});
				myPopup.attachHTML("<div style='width:200px;'>"+this.getUserData(name,"info")+"</div>");
				
				var t = e.target||e.srcElement;
				var x = window.dhx4.absLeft(t);
				var y = window.dhx4.absTop(t);
				var w = t.offsetWidth;
				var h = t.offsetHeight;
				
				myPopup.show(x,y,w,h);
				
			});
		}
	</script>
</head>
<body onload="doOnLoad();">
	<div style="padding-bottom: 50px;">
		Click [?] net to item label
	</div>
	<div id="myForm"></div>
</body>
</html>